<?php
/**
 * User: aka
 * Time: 1:06
 */

namespace app\tenno\behavior;

use app\tenno\model\Users;
use think\facade\Session;

class GetOnLineUserCount
{
    public function run($params)
    {
        $condition = array();
        $condition['delete_state'] = 0;
        $condition['game_state'] = 1;
        $onLineUserCount = Users::where($condition)->count();
        Session::set('online_user_count', $onLineUserCount);
    }
}